<template>
  <div>
    我是子组件
    {{ title }}
    <button @click="biubiu">子向父通信</button>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      required: true
    }
  },
  setup (props, {emit}) {
    console.log(props.title);
    const biubiu = () => {
      emit('biubiu', '子组件的数据')
    }
    return {
      biubiu
    }
  }
}
</script>

<style lang="scss" scoped>

</style>